if LivePasteMode or (PasteTransferMode <> SrcCopy) then begin
LivePasteMode := false;
PasteTransferMode := SrcCopy;
if PasteControl <> nil then
DrawPasteControl
end;
with info^ do begin
SetupUndo;
WhatToUndo := UndoPaste;
if RoiShowing then
with RoiRect do {Pasting back into selection of same size?}
if ((right - left) = (ClipBufInfo^.RoiRect.right - ClipBufInfo^.RoiRect.left)) and ((bottom - top) = (ClipBufInfo^.RoiRect.bottom - ClipBufInfo^.RoiRect.top)) and (ClipBufInfo^.RoiType = RoiType) then begin
OpPending := true;
CurrentOp := PasteOp;
exit(PastePicture)
end;
with ClipBufInfo^.RoiRect do {Pasting into same size window?}
if (PicRect.right = right - left) and (PicRect.bottom = (bottom - top)) and (ClipBufInfo^.RoiType = RectRoi) then begin